package com.yaorange.service;

import com.github.pagehelper.PageInfo;
import com.yaorange.entity.Apply;

import java.util.List;

/**
 * @description:
 * @company: yaorange
 * @author: 啊啊啊林
 * @version: 1.0
 * @create: 2021-09-26 19:38:46
 */
public interface ApplyService {

    //
    List<Apply> selectApplyDate(Integer state);

    //修改状态
    int updateApplyState(Integer applyId, Integer stateId);

    PageInfo<Apply> selectApplyByPage(Integer currentPage, Integer pageSize);

    //条件分页查询
    PageInfo<Apply> selectApplyByPageOne(Integer userId);


    int insertNewApply(Apply apply);

    PageInfo<Apply> selectApplyList(Integer userId, Integer currentPage, String goodsName, Integer typeId);

    int deleteApplyByApplyId(Integer applyId);

    /** 重新申请
     * @param applyId  申请人id
     * @param applyReason 申请例由
     * @param applyNum 申请数量
     * @return int
     * @throws
     * @description:
     */
    int updateApplyPerson(Integer applyId, String applyReason, Integer applyNum);

    //批量撤回
    int updateApplyStateMany(Integer[] str);
}
